
import React from 'react'
import { helpers } from '@/lib/trpc';
import HomeView from '@/modules/home/ui/views/home-view';

export const dynamic = 'force-dynamic'

interface PageProps {
  searchParams: Promise<{
    categoryId?: string
  }>
}

export default async function Page({ searchParams }: PageProps) {
  const { categoryId } = await searchParams

  void helpers.categories.getMany.prefetch()

  return (
    <HomeView categoryId={categoryId} />
  )
}


